package com.updesignsz.admin.vo.form;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author lx
 * @since 1.0
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class TypeForm implements Serializable {
    private static final long serialVersionUID = 8049975129163231191L;

    @NotNull(message = "Id不能为空", groups = PutMapping.class)
    private Integer id;

    @NotBlank(message = "类型名称不能为空", groups = {PutMapping.class, PostMapping.class})
    private String name;

    private Integer type;

}
